package com.example.flashsales.service;

import com.example.flashsales.entity.dto.StoreDto;
import com.example.flashsales.entity.pojo.Store;
import com.example.flashsales.entity.vo.*;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface StoreService {

    //商家增加拉人数
    boolean addUserCount(long storeId, int count);

    //查看自己的信息
    StoreVo viewStoreMessage(long storeId);

    //根据电话号码查询
    StoreVo viewMessageByPhone(String phone);

    //注册
    String register(StoreDto storeDto);

    //登录(账号密码登录)
    StoreVo loginByAccountAndPassword(String phone,String password);

    //登录(短信验证码登录)
    StoreVo loginByPhone(String phone);

    //修改密码(原密码修改)
    String modifyPasswordByOldPassword(String newPassword,String oldPassword,long storeId);

    //修改密码（短信验证码修改）
    String modifyPasswordByPhone(String newPassword,long storeId);

    //修改店家地址
    boolean modifyAddress(String address,long storeId);

    //查看所有流水纪录
    List<StoreCostRecordVo> viewAllStoreCostRecord(long storeId,int page,int num);

    //按类型查看流水纪录时间
    List<StoreCostRecordVo> viewStoreRecordByTimeAndState(long storeId, Date qDate,Date hDate,int page,int num,int state);

    //查看自己的余额
    Map<String,Double> viewMoney(long storeId);

    //确认收货（修改订单状态）
    boolean updateOrderState(long orderId,long storeId);

    //TODO 通知用户收货


    //修改店家的订单总数
    boolean addOrderStore(long storeId,int count);

    // 查看商品的信息
    GoodsVo viewGoods(long goodsId);

    //查看全部订单
    List<OrdersVo> viewAllOrders(long storeId,int page,int num);

    // 按时间查看订单
    List<OrdersVo> viewOrdersByTime(long storeId, int page, int num, Date qDate, Date hDate);

    //TODO 添加客户（二维码或邀请码）


    //查看店家邀请码
    String viewInviteCode(long storeId);

    //提现
    boolean withDro(long storeId,double money);


    //查看自己拉的人数
    List<UserVo> viewUsers(long storeId);

    //改余额
    boolean updateMoney(long storeId,double money,int state);

    //设置拉一个人挣得金额
    boolean updateStoreUserMoney(long storeId,double money);

    //设置成交一单的金额
    boolean updateStoreOrderMoney(long storeId,double money);

    //修改自己的状态
    boolean updateStoreState(long storeId,int state);

    //根据邀请码获取店家信息
    Store viewStoreMessageByInviteCode(String inviteCode);

    //查看流水纪录条数
    Integer viewCostRecordCount(Long storeId);
}